package comtwo;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class Demo9 {
    public static void main(String[] args) {
        List list = new ArrayList();
        list.add(1);
        list.add(3);
        list.add(5);
        list.add(2);

        Collections.sort(list);
        Comparable max = Collections.max(list);
        System.out.println(max.toString());
       /* for (int i = 0; i <list.size() ; i++) {
            System.out.println(list.get(i));
        }*/
    }
}
